﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BlueLotus7.Common
{
    public class AlbumImage : UploadFile
    {
        protected string imageTitle;
        protected string internalIdentity;
        protected List<Comment> comments;

        public string ImageTitle
        {
            get { return imageTitle; }
            set { imageTitle = value; }
        }

        public string InternalIdentity
        {
            get { return internalIdentity; }
            set { internalIdentity = value; }
        }

        public List<Comment> Comments
        {
            get { return comments; }
            set { comments = value; }
        }

        public AlbumImage(Guid ownerKey, string imageTitle, string fileName, string fileExtention, byte[] fileData)
            : base(ownerKey, fileName, fileExtention, fileData)
        {
            this.imageTitle = imageTitle;
        }

        #region IValidate Members

        public override void Validate()
        {
            base.Validate();
            if (string.IsNullOrWhiteSpace(imageTitle))
            {
                throw new NullReferenceException("imageTitle");
            }

        }

        #endregion
    }
}
